/**
 * $Revision: 1.0 $
 * $Author: Eric Yang $
 * $Date: Aug 30, 2009 9:42:20 PM $
 *
 * Author: Eric Yang
 * Date  : Aug 30, 2009 9:42:20 PM
 *
 */
package com.gooex.web.action.gbuy.usercenter.address;

import com.gooex.domain.organization.Address;
import com.gooex.service.organization.IAddressManager;
import com.gooex.web.action.BaseProtectedAction;


/**
 * @author Eric Yang
 * @version 1.0
 */
public class SaveAddress extends BaseProtectedAction {

	private IAddressManager addressManager;

	private Address address;

	@Override
	public String execute() throws Exception {
		if (address == null) {
			return INPUT;
		}
		addressManager.saveAddress(address);
		return SUCCESS;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public void setAddressManager(IAddressManager addressManager) {
		this.addressManager = addressManager;
	}

}
